1. Field of the Invention
The present invention relates to encoding and decoding a media signal, and more particularly, to a method and apparatus for encoding/decoding which enables data, used to determine a table which is referred to by frames of a media signal, to be reduced.
2. Description of the Related Art
When a media signal is transmitted, a compression technology is used to reduce a bandwidth of the signal or a bit rate. Apparatuses for encoding and decoding contain information relating to a table used by a media signal as a regulation set in advance between both apparatuses. A media signal uses a coefficient table to improve operation speed or uses an address table to transmit data to a designated address. The apparatuses for encoding and decoding prepare a plurality of operation tables so that one operator selects appropriate table among the plurality of operation tables and performs various functions using the selected table. In order to designate the table used in each frame, a predetermined bit is needed. For example, entropy coding, which performs data compression using statistical characteristics of a signal, generates models having various distributions of data. When statistical models of data increase, the number of tables also increases. When the number of tables increases, the amount of information to designate tables also increases.
FIG. 1 illustrates the number of bits needed to designate a table used in a media signal. Referring to FIG. 1, a media signal includes a header 101 and frames 103. An apparatus for encoding/decoding contains information relating to tables which can be referred to by the media signal in advance. It is assumed that the number of whole tables which can be referred to by the media signal is N. Each frame includes information for identifying the tables which are referred to so as to perform an operation. In order to identify one table from among N tables, log2 N bits are needed. When the frame selects a table L times, the number of bits needed to designate the table by one frame is (log2 N)*L. When the number of frames is K, the number of bits needed to designate the table in K frames is (log2 N)*L*K. The larger the number of whole tables which can be referred to by a media signal, that is N, the more bits are needed to designate the table. When the number of the tables N which can be referred to by a media signal is reduced so as to reduce the number of bits needed to designate the table, various characteristics of the signal cannot be reflected, and thus an inefficient operation may be performed.